package com.sdp.th.netty.bizc;

import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BusinessFactory {

	public final ConcurrentHashMap<BusinessEnum, BusinessService> businessMap = new ConcurrentHashMap<>();
	
	@Autowired
	public BusinessFactory(List<BusinessService> businessServices) {
		businessServices.forEach(x-> businessMap.put(x.getBusinessType(), x));
	}
}
